﻿namespace Homework02
{
    internal class Program
    {
        /// <summary>
        /// 在屏幕上显示一个倒计时30秒。使用这个语句thread.sleep（1000）
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //Todo write the loop body for a countdown function
            static void Countdown(int seconds)
            {
                for (int i = seconds; i >=0; i--)
                {
                    Console.WriteLine(i);
                    //Todo have a one-second interval between the two numbers.
                    System.Threading.Thread.Sleep(1000);
                }
                Console.WriteLine("Time is up！");
            }
            //Todo countdown 30 seconds
            Countdown(30);
        }
    }
}